package cn.bdqn.mh.vo;

import cn.bdqn.mh.pojo.Category;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class CategoryVO {
    private Integer id;
    @NotBlank(message = "新闻类型必须输入")
    private String name;
    private Integer createdBy;
    private Date createDate;

    public CategoryVO(Category Category){
        this.id=Category.getId();
        this.name=Category.getName();
    }
}
